<template>
  <view class="detail-page">
    <!-- 顶部导航 -->
    <view class="nav">
      <uni-icons type="back" size="22" color="#333" />
      <text class="nav-title">电场详情</text>
      <view class="nav-actions">
        <uni-icons type="more-filled" size="20" color="#333" />
      </view>
    </view>

    <!-- 顶部图片 -->
    <image class="banner"  mode="aspectFill"></image>

    <!-- 黑色信息区 -->
    <view class="overview">
      <view class="left-tag">异常中</view>
      <image class="star" src="/static/images/star.png" />
      <view class="score-row">
        <text class="score">4.8</text>
        <text class="score-desc">最近三天有60人充电成功</text>
      </view>
      <text class="site-name">新宇建筑楼充电桩场地</text>
    </view>

    <!-- 白色卡片：快慢与车位列表 -->
    <view class="card">
      <view class="card-header">
        <view class="tag-combo fast"><text class="segment left">快</text><text class="segment right">空闲12/20</text></view>
        <view class="tag-combo slow"><text class="segment left">慢</text><text class="segment right">空闲20/20</text></view>
      </view>

      <view class="slot-list">
        <view class="slot-item">
          <uni-icons type="checkbox" size="18" color="#1CCCB4" />
          <view class="slot-texts">
            <text class="slot-title">1号车位</text>
            <text class="slot-desc">龙里小区A栋A234车位</text>
          </view>
        </view>
        <view class="slot-item">
          <uni-icons type="checkbox" size="18" color="#1CCCB4" />
          <view class="slot-texts">
            <text class="slot-title">2号车位</text>
            <text class="slot-desc">龙里小区2座B001车位</text>
          </view>
        </view>
        <view class="slot-item">
          <uni-icons type="checkbox" size="18" color="#1CCCB4" />
          <view class="slot-texts">
            <text class="slot-title">3号车位</text>
            <text class="slot-desc">龙里小区2座C008车位</text>
          </view>
        </view>
      </view>

      <view class="expand-row">
        <text>展开全部充电桩</text>
        <uni-icons type="right" size="14" color="#00C2A0" />
      </view>
    </view>

    <!-- 说明区 -->
    <view class="specs">
      <view class="spec-title">收费标准</view>
      <view class="spec-title">支付方式</view>
      <view class="spec-title">进出时间</view>
      <view class="spec-title">停车时间</view>
      <view class="spec-title">预约规则</view>
      <view class="spec-title">充电站沿途</view>
    </view>

    <!-- 宣传卡片占位 -->
    <view class="promo-card">
      <image class="promo-image" src="/static/images/banner_small.png" mode="widthFix" />
    </view>

    <!-- 价格与按钮 -->
    <view class="price-row">
      <view class="left">
        <text class="price">¥0.7100/度</text>
        <text class="time">适用时间 11:00-18:00</text>
      </view>
      <view class="right">
        <text class="link">查看收费标准</text>
        <uni-icons type="right" size="14" color="#1CCCB4" />
      </view>
    </view>

    <view class="bottom-btn">扫码充电</view>
  </view>
</template>

<script setup>
// 此页为静态示例UI，后续可对接真实数据与交互
</script>

<style scoped>
.detail-page {
  width: 390px;
  height: 1507px;
  background: #fff;
  margin: 0 auto;
}

.nav {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.nav-title {
  margin-left: 8px;
  font-size: 16px;
  color: #333;
}
.nav-actions {
  margin-left: auto;
}

.banner {
  width: 100%;
  height: 180px;
  border-radius: 8px;
}

.overview {
  background: #000;
  padding: 12px;
  position: relative;
}
.left-tag {
  display: inline-block;
  background: #00C2A0;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}
.star {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 18px;
  height: 18px;
}
.score-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
}
.score {
  color: #00C2A0;
  font-size: 14px;
  margin-right: 8px;
}
.score-desc {
  color: #9aa0a6;
  font-size: 12px;
}
.site-name {
  color: #fff;
  font-size: 16px;
  margin-top: 8px;
}

.card {
  margin: 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 12px;
}
.card-header {
  display: flex;
  gap: 10px;
}

.tag-combo {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 14px;
  overflow: hidden;
}
.segment {
  font-size: 12px;
  padding: 2px 10px;
}
.tag-combo.fast { border-color: #ff8a47; }
.tag-combo.fast .left { background: #ff8a47; color: #fff; }
.tag-combo.fast .right { background: #fff; color: #ff8a47; }
.tag-combo.slow { border-color: #1CCCB4; }
.tag-combo.slow .left { background: #1CCCB4; color: #fff; }
.tag-combo.slow .right { background: #fff; color: #1CCCB4; }

.slot-list { margin-top: 10px; }
.slot-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.slot-item:last-child { border-bottom: none; }
.slot-texts { margin-left: 10px; }
.slot-title { font-size: 14px; color: #333; }
.slot-desc { font-size: 12px; color: #888; margin-top: 2px; }

.expand-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  color: #00C2A0;
  font-size: 12px;
}

.specs {
  padding: 12px;
}
.spec-title {
  color: #666;
  font-size: 13px;
  margin: 10px 0;
}

.promo-card { padding: 0 12px; }
.promo-image { width: 100%; border-radius: 10px; }

.price-row {
  margin: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price { color: #1CCCB4; font-size: 16px; }
.time { margin-left: 8px; color: #666; font-size: 12px; }
.right { display: flex; align-items: center; }
.link { color: #1CCCB4; font-size: 12px; margin-right: 4px; }

.bottom-btn {
  margin: 0 12px;
  background: #1DCFB7;
  color: #fff;
  text-align: center;
  border-radius: 24px;
  padding: 12px 0;
  font-size: 16px;
}
</style>